<template>
    <!-- 编辑弹窗 -->
    <el-dialog v-model="store.state.storemsg.openOpen" title="门店状态信息" width="20%"
    align-center>
        <div style="font-size: 18px;">
            确定营业：<span class="blue">{{  }}11</span>
        </div>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="handlecancel">取消</el-button>
                <el-button type="primary" @click="handelsubmit">确定</el-button>
            </span>
        </template>
    </el-dialog>
</template>

<script setup lang="ts">
import { defineEmits } from 'vue'
import { useStore } from 'vuex';
import { ElMessage, } from 'element-plus'
import http from '../util/api'

const store = useStore()

const formLabelWidth = '140px'

//父组件重新获取信息
const emit = defineEmits(['getList'])
 
//确认修改
const handelsubmit = () => {
    // http(`/shop/${store.state.storemsg.closeForm.state}`, 'put', store.state.storemsg.closeForm).then((res:any) => {
    //     if (res.status === 200) {
    //         ElMessage({
    //             type: 'success',
    //             message: '修改成功！',
    //         })

    //         emit('getList')
    //     } else {
    //         ElMessage({
    //             type: 'error',
    //             message: '修改失败！',
    //         })
    //     }
    //     store.commit('changeOpen')
    // })
    console.log('点了确定'); 
    store.commit('changeState')
    console.log(store.state.storemsg.ocState);
    store.commit('changeOpen')
}

//取消修改
const handlecancel = () => {
    store.commit('changeOpen')
    ElMessage({
        type: 'info',
        message: '已取消！',
    })
}

</script>
<style scoped>
.blue{
    color: skyblue;
}
.el-button--text {
    margin-right: 15px;
}

.el-select {
    width: 300px;
}

.el-input {
    width: 300px;
}

.dialog-footer button:first-child {
    margin-right: 10px;
}
</style>